package com.unitd.modules;

import com.unitd.springboot.starter.mybatis.EnableMybatis;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;

/**
 * @desc 配置中心服务端应用启动类
 * @filename ConfigCenterServerApplication.java
 * @copyright www.unitd.com
 * @author Hudan
 * @version 1.0
 * @date 2018/1/10
 */
@SpringBootApplication
@MapperScan(basePackages = "com.unitd.modules.configcenter.dao")
@ComponentScan(value = {"com.unitd.modules"})
@ServletComponentScan
@EnableMybatis
public class ConfigCenterServerApplication extends SpringBootServletInitializer {

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(ConfigCenterServerApplication.class);
	}

	public static void main(String[] args) {
		System.out.println("Hello World!");
		SpringApplication.run(ConfigCenterServerApplication.class, args);
	}
}
